#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import os
import shutil
import codecs

def readChannelConfig(filename):
	if(False == os.path.exists(filename)):
		print("文件不存在,初始化失败!")
		return
	
	fp = codecs.open(filename, "rb", "utf-8")
	all_the_text = fp.readlines()
	fp.close()
	for line in all_the_text:
		if line.startswith("["):
			print(line.replace("[","").replace("]","").replace("\n",""))
	print("all")

if __name__=="__main__":
	configfile = "./userconfig/channelinfolist.conf"
	readChannelConfig(configfile)